package com.example.shiyan02.view

import android.widget.EditText
import android.widget.TextView

class ProgramView(
    private val programInput: EditText,
    private val adviceResult: TextView
) {
    fun getInputProgram(): String {
        return programInput.text.toString().trim()
    }

    fun clearInput() {
        programInput.text.clear()
    }

    fun displayAdvice(advice: String) {
        adviceResult.text = advice
    }

    fun showError(message: String) {
        adviceResult.text = message
    }
}